const API = require('./src/utils/API')
module.exports = {
    //移动端rem尺寸适配
    css: {
        loaderOptions: {
            postcss: {
                plugins: [
                    require('postcss-px2rem')({
                        remUnit: 37.5
                    })
                ]
            }
        }
    },

    //跨域前端代理配置
    devServer: {
        https: false,
        open: false,
        proxy: {
            [API.DEV_AGENT]: {
                target: API.BSAE_URL,
                ws: true,
                changeOrigin: true,
                pathRewrite: {
                   [ '^'+API.DEV_AGENT]: ''
                }
            }
        }
    },

    pluginOptions: {
      'style-resources-loader': {
        preProcessor: 'less',
        patterns: []
      }
    }
}
